package com.woniu.mgr.controller;


import com.woniu.mgr.common.Result;
import com.woniu.mgr.model.Pic;
import com.woniu.mgr.service.PicService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 场馆图片表 前端控制器
 * </p>
 *
 * @author Silas
 * @since 2023-02-15
 */
@RestController
@RequestMapping("/pic")
@Slf4j
public class PicController {

    @Resource
    private PicService picService;

    @GetMapping("/picGet")
    public Result picGet(Integer picId){
        log.info("查看图片链接 {}",picId);
        Pic pic = picService.getById(picId);
        return Result.success(200,"查询成功",pic);
    }
}

